Repository navigation
Fix not found page appears when enabling policy feature offline - #57486
Conversation
| command, | ||
| data, | ||
| initiatedOffline: isOffline(), | ||
| requestID: requestIndex++, |
There was a problem hiding this comment.
I think we should update this to use a unique timestamp with Date.now() for this variable
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-03-02.at.13.11.43.mp4Android: mWeb ChromeScreen.Recording.2025-03-02.at.13.00.05.mp4iOS: NativeScreen.Recording.2025-03-02.at.12.28.08.mp4iOS: mWeb SafariScreen.Recording.2025-03-02.at.12.25.47.mp4MacOS: Chrome / SafariScreen.Recording.2025-03-02.at.12.13.41.mp4MacOS: DesktopScreen.Recording.2025-03-02.at.12.15.58.mp4 |
| }); | ||
| }); | ||
|
|
||
| test('All write requests are in the queue should be called even some of them are the same', () => { |
There was a problem hiding this comment.
I think we should update this to use a unique timestamp with Date.now() for this variable
@suneox This test fails when I use Date.now() because three APIs are called almost the same time.
There was a problem hiding this comment.
Can you try to mockImplementation for Date.now with a manually increasing time value?
There was a problem hiding this comment.
@suneox I think we can't because the implementation is executed when the mock is called, while the request is initialized when we call API.write. I updated the description for requestID.
There was a problem hiding this comment.
Ok, I got it. Thanks for the explanation
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.1.10-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.1.10-6 🚀
|
| API.write(WRITE_COMMANDS.ENABLE_POLICY_DISTANCE_RATES, parameters, onyxData, { | ||
| checkAndFixConflictingRequest: (persistedRequests) => resolveEnableFeatureConflicts(WRITE_COMMANDS.ENABLE_POLICY_DISTANCE_RATES, persistedRequests, parameters), | ||
| }); |
There was a problem hiding this comment.
This check caused inconsistencies in data updates #68739
Explanation of Change
Fix not found page appears when enabling policy feature offline
Fixed Issues
$ #57119
PROPOSAL: #57119 (comment)
Tests
Offline tests
None
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-02-26.at.22.36.21.mov
Android: mWeb Chrome
androidmweb.mov
iOS: Native
Screen.Recording.2025-02-26.at.22.44.54.mov
iOS: mWeb Safari
Screen.Recording.2025-02-26.at.22.35.30.mov
MacOS: Chrome / Safari
Screen.Recording.2025-02-26.at.22.22.50.mov
MacOS: Desktop
Screen.Recording.2025-02-26.at.22.48.15.mov